package cn.wolfcode.crm.util;

import com.fasterxml.jackson.databind.ObjectMapper;

public abstract class JsonUtil {

    public static final ObjectMapper mapper = new ObjectMapper();

    public static String parseToString(Object obj) {
        try {
            return mapper.writeValueAsString(obj);
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException("JSON 转换异常");
        }
    }

}
